#include <iostream>
using namespace std;

#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string>
#include <cstring>


int main()
{
    const char *filename = "./test.txt";

    off_t length = 10;
    truncate(filename,length);
    return 0;
}